from aliyunsdkcore import client
from aliyunsdklive.request.v20161101 import DescribeLiveStreamsFrameRateAndBitRateDataRequest
import os
import json

def init():
    env_dist = os.environ
    clt = client.AcsClient(env_dist.get('accessKeyId'), env_dist.get('secret'), env_dist.get('regionId'))
    request = DescribeLiveStreamsFrameRateAndBitRateDataRequest.DescribeLiveStreamsFrameRateAndBitRateDataRequest()
    request.set_DomainName('play-live-one-sz.alivecdn.com')
    request.set_AppName('appWsk')
    request.set_StreamName('streamWsk')
    result = clt.do_action_with_exception(request)
    print(result)
    x = json.loads(result)
    print(x['RequestId'])
    print(x['FrameRateAndBitRateInfos'])

if __name__ == '__main__':
    init()